package cglib;

import org.apache.commons.lang.StringEscapeUtils;

import util.StringUtil;

import net.sf.cglib.beans.BeanCopier;

class MyBean1 {
	private String name;

	public MyBean1(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}

class MyBean2 {
	private String name;
	private String name1;
	public MyBean2(String name) {
		this.name1 = name;
	}
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName1() {
		return this.name1;
	}
	public void setName1(String name) {
		this.name1 = name;
	}
	
}

public class BeanConverterDemo {
	public static void main(String[] args) {
		BeanCopier copier = BeanCopier.create(MyBean1.class, MyBean2.class, false);
		MyBean1 b1 = new MyBean1("abc");
		MyBean2 b2 = new MyBean2("");
		copier.copy(b1, b2, null);
		
	}
}
